<h1>New data_sample</h1>

<% form_for(@data_sample) do |f| %>
  <%= f.error_messages %>

  <p>
    <%= f.label :start %><br />
    <%= f.datetime_select :start %>
  </p>
  <p>
    <%= f.label :end %><br />
    <%= f.datetime_select :end %>
  </p>
  <p>
    <%= f.label :time_step %><br />
    <%= f.text_field :time_step %>
  </p>
  <p>
    <table>
    <h1> data points </h1> <br />
    <% @available_datapoints.each do |point| %>
      <tr><td><%= f.label point.description %></td>
      <td><%= check_box_tag "follow_points[#{point.key}]", point.id %></td></tr>
    <% end %>
    </table>
  <p>
    <%= f.submit "Create" %>
  </p>
<% end %>

<%= link_to 'Back', data_samples_path %>
